<?php
/*
 * Squelette : dist/backend-breves.html
 * Date :      Wed, 20 Sep 2006 11:46:15 GMT
 * Compile :   Fri, 13 Apr 2007 19:06:56 GMT (-0.74s)
 * Boucles :   _breves
 */ 
//
// <BOUCLE breves>
//
function BOUCLE_breveshtml_ea873efe8738029a5ba9c62d6a31cecc(&$Cache, &$Pile, &$doublons, &$Numrows, $SP) {
	$old_lang = $GLOBALS['spip_lang'];

	// REQUETE
	$result = spip_abstract_select(
		array("breves.titre",
		"breves.id_breve",
		"breves.date_heure",
		"breves.texte",
		"breves.lang"), # SELECT
		array("spip_breves AS breves"), # FROM
		array("".($Pile[$SP]['id_rubrique'] ? "(breves.id_rubrique = '" . addslashes($Pile[$SP]['id_rubrique']) . "')" : 1)."",
		"".($Pile[$SP]['lang'] ? "(breves.lang = '" . $GLOBALS['spip_lang'] . "')" : 1)."",
		"breves.statut='publie'"), # WHERE
		'', # GROUP
		array('breves.date_heure' . ' DESC'), # ORDER
		'0,10', # LIMIT
		'', # sous
		'', # HAVING
		'breves', # table
		'_breves', # boucle
		''); # serveur
	$t0 = "";
	$SP++;

	// RESULTATS
	while ($Pile[$SP] = @spip_abstract_fetch($result,"")) {

		$Cache['id_breve'][$Pile[$SP]['id_breve']] = 1; // invalideurs
		if (!$GLOBALS['forcer_lang'])
	 		$GLOBALS['spip_lang'] = ($x = $Pile[$SP]['lang']) ? $x : $old_lang;
		$t0 .= ('
	<item>
		<title>' .
interdire_scripts(texte_backend(supprimer_numero(typo($Pile[$SP]['titre'])))) .
'</title>
		<link>' .
interdire_scripts(htmlspecialchars(vider_url(lire_meta('adresse_site')))) .
'/' .
htmlspecialchars(vider_url(generer_url_breve($Pile[$SP]['id_breve']))) .
'</link>
		<date>' .
vider_date($Pile[$SP]['date_heure']) .
'</date>
		<description>' .
(($t1 = extraire_attribut(affiche_logos(calcule_logo('BREVE', 'ON', $Pile[$SP]['id_breve'],'',  '0'), '', ''),'src')) ?
			(('&lt;img src="' .
interdire_scripts(htmlspecialchars(vider_url(lire_meta('adresse_site')))) .
'/') . $t1 . '" align="left" hspace="4" vspace="4"&gt; ') :
			('')) .
interdire_scripts(texte_backend(traiter_raccourcis($Pile[$SP]['texte']))) .
'</description>
		<dc:date>' .
date_iso(vider_date($Pile[$SP]['date_heure'])) .
'</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>' .
htmlentities($Pile[$SP]['lang'] ? $Pile[$SP]['lang'] : $GLOBALS['spip_lang']) .
'</dc:language>
	</item>
	');
	}

	$GLOBALS['spip_lang'] = $old_lang;
	@spip_abstract_free($result,'');
	return $t0;
}



//
// Fonction principale du squelette dist/backend-breves.html
//
function html_ea873efe8738029a5ba9c62d6a31cecc ($Cache, $Pile, $doublons=array(), $Numrows='', $SP=0) {
$t0 = ('<?php
	@header(\'Content-type: text/xml' .
(($t1 = interdire_scripts(lire_meta('charset'))) ?
			('; charset=' . $t1) :
			('')) .
'\');
	echo \'<\'.\'?xml version="1.0" encoding="' .
interdire_scripts(lire_meta('charset')) .
'"?\'.">\\n";
?>
<rss version="0.91" xmlns:dc="http://purl.org/dc/elements/1.1/">

<channel>

	<title>' .
interdire_scripts(texte_backend(typo(lire_meta('nom_site')))) .
'</title>
	<link>' .
interdire_scripts(htmlspecialchars(vider_url(lire_meta('adresse_site')))) .
'/</link>
	<description></description>
	<language>' .
htmlentities($Pile[0]['lang'] ? $Pile[0]['lang'] : $GLOBALS['spip_lang']) .
'</language>

	<image>
		<title>' .
interdire_scripts(texte_backend(typo(lire_meta('nom_site')))) .
'</title>
		<url>' .
interdire_scripts(htmlspecialchars(vider_url(lire_meta('adresse_site')))) .
(($t1 = extraire_attribut(affiche_logos(calcule_logo('RUBRIQUE', 'ON', "'0'",sql_parent("'0'"),  '0'), '', ''),'src')) ?
			('/' . $t1) :
			('')) .
'</url>
		<link>' .
interdire_scripts(htmlspecialchars(vider_url(lire_meta('adresse_site')))) .
'/</link>
		<description></description>
	</image>

	' .
BOUCLE_breveshtml_ea873efe8738029a5ba9c62d6a31cecc($Cache, $Pile, $doublons, $Numrows, $SP) .
'

</channel>

</rss>
');

	return array(
		'texte' => $t0,
		'squelette' => 'html_ea873efe8738029a5ba9c62d6a31cecc',
		'process_ins' => ((strpos($t0,'<'.'?')=== false) ? 'html' : 'php'),
		'invalideurs' => $Cache
	);
}

?>